package org.ddd.productdemo.domaindriven.domain.repository;

import org.ddd.productdemo.domaindriven.domain.model.aggregate.Order;
import org.ddd.productdemo.domaindriven.domain.model.aggregate.OrderId;
import org.ddd.productdemo.domaindriven.domain.model.entity.CustomerId;

import java.util.List;
import java.util.Optional;

public interface OrderRepository {

    Optional<Order> findById(OrderId id);
    Order save(Order order);
    void delete(OrderId id);

    List<Order> findByCustomerId(CustomerId customerId);
}
